/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.izu.mytruco.game;

import com.izu.mytruco.deck.Card;
import com.izu.mytruco.deck.Deck;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Ademar
 */
public class Truco {

    protected Deck deck;
    protected List<Player> players;

    public Truco(Integer numberPlayers) {
        deck = new Deck();
        players = new ArrayList<Player>(numberPlayers);
    }

    public List<Card> getCards(Boolean botton) {
        List<Card> cards = new ArrayList<Card>(3);
        for (int i = 0; i < 3; i++ ) {
            if (botton) {
                cards.add(deck.getCards().pollLast());
            } else {
                cards.add(deck.getCards().pollFirst());
            }
        }
        return cards;
    }
}
